define([],function(){
    var tpl = {};

    tpl.schemeListInit = function(){
        var html = '';
        html += schemeList();
        return html;
    };

    tpl.addSchemeForm = function(){
        var html = '';
        html += addSchemeForm();
        return html;
    };

    var schemeList = function(){
        return  '<script id ="nutrition_schemeList" type="text/html">'+
                '   <div class="scheme-box new-scheme" id="new-scheme">'+
                '       <i class="fa fa-plus" aria-hidden="true"></i>'+
                '   </div>'+
                '   {{each list as value i}}'+
                '   <div class="scheme-box" schemeId="{{value.schemeId}}" schemeVersionId="{{value.schemeVersionId}}">'+
                '       <div class="scheme-info">'+
                '           <div class="scheme-name">'+
                '               <i class="fa fa-folder-o" aria-hidden="true"></i>'+
                '               {{value.versionName}}'+
                '           </div>'+
                '           <div class="scheme-type">'+
                '               <span>{{value.createName}}</span>'+
                '               <i class="fa fa-circle" aria-hidden="true"></i>'+
                '               <span>{{value.createTime}}</span>'+
                '           </div>'+
                '       </div>'+
                '       <div class="scheme-operation">'+
                '           <span class="setScheme">'+
                '               <i class="fa fa-cog" aria-hidden="true"></i><br>'+
                '               设置'+
                '           </span>'+
                '           <span class="copyScheme">'+
                '               <i class="fa fa-files-o" aria-hidden="true"></i><br>'+
                '               拷贝'+
                '           </span>'+
                '       </div>'+
                '   </div>'+
                '   {{/each}}'+
                '</script>';
    };

    var addSchemeForm = function(){
        return  '<script id ="nutrition_addSchemeForm" type="text/html">'+
                '    <form class="form-horizontal">'+
                '        <div class="form-group">'+
                '            <label for="schemeName" class="col-sm-3 control-label"><i class="not-null">*</i>方案名称</label>'+
                '            <div class="col-sm-8">'+
                '                <input type="text" class="form-control" id="schemeName" value="{{versionName}}">'+
                '            </div>'+
                '        </div>'+
                '        <div class="form-group">'+
                '            <label for="usingTime" class="col-sm-3 control-label"><i class="not-null">*</i>计划使用时间</label>'+
                '            <div class="col-sm-8 options">'+
                '                <div>'+
                '                    <input type="text" class="form-control" id="usingTime" value="{{days}}">'+
                '                </div>'+
                '                <div>'+
                '                    <select id="usingTimeUnit" class="form-control">'+
                '                        <option value="day" selected>天</option>'+
                '                        <option value="week">周</option>'+
                '                        <option value="month">月</option>'+
                '                        <option value="year">年</option>'+
                '                    </select>'+
                '                </div>'+
                '            </div>'+
                '        </div>'+
                '        <div class="form-group">'+
                '            <label for="adaptMan" class="col-sm-3 control-label">适用人群</label>'+
                '            <div class="col-sm-8">'+
                '                <input type="text" class="form-control" id="adaptMan" value="{{schemeApply}}">'+
                '            </div>'+
                '        </div>'+
                '        <div class="form-group">'+
                '            <label for="schemeAim" class="col-sm-3 control-label">营养目标</label>'+
                '            <div class="col-sm-8">'+
                '                <input type="text" class="form-control" id="schemeAim" value="{{versionDesc}}">'+
                '            </div>'+
                '        </div>'+
                '        <div class="form-group">'+
                '            <div class="col-sm-offset-3 col-sm-10">'+
                '                <div id="saveSchemeBtn" class="btn btn-info" schemeId="{{schemeId}}">确定</div>'+
                '            </div>'+
                '        </div>'+
                '    </form>'+
                '</script>';
    }

    return tpl;
});